package com.chaoxuan.uebt.activity;

import android.os.Bundle;
import android.util.Log;
import android.webkit.WebView;

import com.chaoxuan.uebt.R;
import com.chaoxuan.uebt.utils.MyWebViewClient;

public class WebActivity extends BaseActivity{


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_web);
        initTitle();
        String url= getIntent().getStringExtra("url");
        WebView webView=(WebView) findViewById(R.id.webview);
        Log.d("===",url);
        if(url.startsWith("www"))url="http://"+url;
        //加载本地html文件
        // mWVmhtml.loadUrl("file:///android_asset/hello.html");
        webView.getSettings().setJavaScriptEnabled(true);
        webView.loadUrl(url);
        webView.setWebViewClient(new MyWebViewClient());

    }

}
